#ifndef _INPUT_H_
#define _INPUT_H_

#include <glfw.h>

class InputState
{
public:
    InputState();

    int getMouseX() const;
    int getMouseY() const;
    bool leftPressed() const;
    bool rightPressed() const;
    int getWheel() const;

    InputState& operator=(const InputState& rhs);

private:
    int _x, _y, _wheel;
    bool _left, _right;

    friend class Input;
};


class Input
{
public:

    // current input state
    const InputState& getCurrent() const;

    // input state on previous update
    const InputState& getPrevious() const;

    // difference between current and previous state
    const InputState& getDiff() const;

    // reads input & updates the above-mentioned states
    void update();

private:
    InputState _curState, _prevState, _diffState;
};

#endif
